﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true"
    CodeBehind="AdminCategorys.aspx.cs" Inherits="EHTSaleManager.UIAdmin.AdminCategorys" %>

<%@ Register Src="~/UIAdmin/Control/PaggingControl.ascx" TagName="PaggingControl"
    TagPrefix="EHT" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
   
 
   
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h1>
        <asp:Label ID="lbAdminCategory" runat="server" Text="Kategori Leder"></asp:Label>
    </h1>
    <table cellspacing="0" cellpadding="0" class="data-table">
        <tr>
            
            <td  >
               <%-- <asp:DropDownList ID="ddlParent" runat="server" CssClass="textEntry" Width="200px"  AutoPostBack="true"
                    onselectedindexchanged="ddlParent_SelectedIndexChanged">
                </asp:DropDownList>--%>
            </td>                      
             <td style="text-align:right">
                 &nbsp;&nbsp;<asp:Button ID="btnAll" runat="server" CommandName="Login" Text="Alle" 
                     onclick="btnAll_Click"  />
           
                 <asp:Button ID="btnNotAll" runat="server" CommandName="Login" Text="Ikke Alle" 
                     onclick="btnNotAll_Click"  />
          
                 &nbsp;<asp:Button ID="bntadd" runat="server" CommandName="Login" Text="Legg" onclick="bntadd_Click" />
           
                 &nbsp;<asp:Button ID="btnDel" runat="server" Text="Slett" onclick="btnDel_Click" 
                     style="height: 26px" onclientclick="return confirm('Er du sikker');" />
            </td>
        </tr>
    </table>
   
    <table class="data-table">
        <tr>
            <td style="width:30%" valign="top">
                <asp:TreeView ID="tvCategorys" runat="server" 
                    onselectednodechanged="tvCategorys_SelectedNodeChanged" ShowLines="True">
                </asp:TreeView> 
            </td>
            <td style="width:70%" valign="top">
                <asp:DataList ID="dtlCategoryParent" runat="server" DataKeyField="CategoryID" >
         <HeaderTemplate>
            <table cellspacing="0" cellpadding="0" class="data-table" style="text-align:center">
                <thead>
                    
                     
                         <th class="actions edit">
                             
                           
                        </td>
                        </th>
                        <th style="width:50px" class="actions edit">
                            Edit
                        </th>                        
                        <th style="width:200px">
                            Kategori Navn
                        </th>                                               
                        <th style="width:50px">
                            Rekkefølge
                        </th>
                        <th style="width:100px">
                           Bilde
                        </th>
                         <th style="width:50px">
                            Status
                        </th>
                     
                    
                </thead>                           
        </HeaderTemplate>
        <ItemTemplate>                       
           <tr>
            
                <td >
                    <asp:CheckBox ID="ckCategory" runat="server" 
                         />
                          <asp:TextBox ID="txtID" runat="server" Text='<%#Eval("CategoryID")%>' Visible="false"></asp:TextBox>
                </td>
                <td  style="width:50px">
                    <a href='AdminCategory.aspx?CategoryID=<%#Eval("CategoryID")%>'>
                        <img alt="Edit" src="/Styles/Edit.png"></a>
                </td>
                
                <td style="width:200px">
                <asp:Label ID="lbCategoryName" runat="server" Text='<%#Eval("CategoryName") %>'></asp:Label>                    
                </td>
               
                <td>
                    <asp:Label ID="lbOrdering" Width="30" runat="server" Text=' <%#Eval("Ordering") %>'></asp:Label>
                </td>               
                <td style="width:100px">
                    <asp:Image ID="ImagCategory" Width="60" Height="50" ImageUrl='<%#Eval("PictureUrl") %>'
                        runat="server" />
                </td>
                 <td style="width:50px">
                     <asp:TextBox ID="txtstatus" runat="server" Visible="false" Text='<%#Eval("Status")%>'></asp:TextBox>
                     <asp:ImageButton Width="20" Height="20" ID="ImagCheck" CommandArgument='<%#Eval("CategoryID") %>' ImageUrl="~/images/btncheck.png" runat="server" 
                         onclick="ImagCheck_Click" />
                     <asp:ImageButton Width="20" Height="20" ID="ImagUncheck" CommandArgument='<%#Eval("CategoryID") %>' ImageUrl="~/Styles/Delete.png" runat="server" 
                         onclick="ImagUncheck_Click" />
                </td>
                
                    
               
           </tr>                                                                    
        </ItemTemplate>
        
        
    </asp:DataList>
     <p>
        <EHT:PaggingControl ID="PaggingControl1" runat="server" PageURL="AdminCategorys.aspx"
            PageSize="50" />
    </p>
            </td>
        </tr>
    </table>
    
    
</asp:Content>
